/*
	@功能：核心

*/
;(function($){	
	//  此处统一扩展jquery库的全局方法,以ff来标记我们自己扩展的function
	$.extend({
		ff : {
			bIsIE6: $.browser.msie===true && $.browser.version==='6.0',
			substitute: function(sTmpl, hash){
				var match;
				$.each(hash, function(key, value){
					match = new RegExp("{{+"+key+"+}}","g");
					sTmpl = sTmpl.replace(match, value);
				})
				return sTmpl;
			},
			fnGetZIndex: (function(){
				var _iZIndex = 1000;
				return function(){
					return ++_iZIndex;	
				};
			})()
		}	
	});

})(jQuery);
// 全局JSONP回调方法
;(function(){
	
	var oFns = {};
	
	window.fnCallback = function(){
		var _arg1 = arguments[0],
			_arg2 = arguments[1] || [],
			jqThis = $(this);
				
		if(typeof(_arg1)==='string'){
			var _array = [];
			for(var i=1,len=arguments.length;i<len;i++){
				_array.push(arguments[i]);
			}
			oFns[_arg1] && oFns[_arg1].apply(window, _array);
		};
	};
	
	fnCallback.fnAddFunction = function(sName, fnFunc){
		oFns[sName] = fnFunc;
	};
	
	fnCallback.fnRemoveFunction = function(sName){
		delete oFns[sName];
	};
})();